]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
appDisplay: Check 'app-picker-layout' to make icons draggable
authorGeorges Basile Stavracas Neto <georges.stavracas@gmail.com>
Thu, 16 Jul 2020 14:15:03 +0000 (11:15 -0300)
committerFlorian Müllner <florian.muellner@gmail.com>
Mon, 20 Jul 2020 16:13:20 +0000 (16:13 +0000)
Now we drag not only to the Dash, but also to the icon grid itself,
so make the app icon draggable only when either one or the other is
writable.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1284

js/ui/appDisplay.js

index a2ae129a4a6a04cf4236eda8e2a61c356435352f..dde351be2522cc7247fdb00c2b59b9db4eb249b1 100644 (file)
@@ -843,7 +843,9 @@ class AppDisplay extends BaseAppView {
         // at least on single-monitor setups.
         // This also disables drag-to-launch on multi-monitor setups,
         // but we hope that is not used much.
-        let favoritesWritable = global.settings.is_writable('favorite-apps');
+        const isDraggable =
+            global.settings.is_writable('favorite-apps') ||
+            global.settings.is_writable('app-picker-layout');
 
         apps.forEach(appId => {
             if (appsInsideFolders.has(appId))
@@ -853,9 +855,7 @@ class AppDisplay extends BaseAppView {
             if (!icon) {
                 let app = appSys.lookup_app(appId);
 
-                icon = new AppIcon(app, {
-                    isDraggable: favoritesWritable,
-                });
+                icon = new AppIcon(app, { isDraggable });
             }
 
             appIcons.push(icon);